import request from '@/utils/request'

// 创建科技成果鉴定
export function addAchievement(data?: any) {
  return request({
    url: '/project/technology-achievement-certify/create',
    method: 'POST',
    data,
  })
}
// 获得科技成果鉴定分页
export function getAchievementList(params?: any) {
  return request({
    url: '/project/technology-achievement-certify/page',
    method: 'GET',
    params,
  })
}

// 获得科技成果鉴定
export function getAchievementInfo(params?: any) {
  return request({
    url: '/project/technology-achievement-certify/get',
    method: 'GET',
    params,
  })
}

// 删除科技成果鉴定
export const deleteAchievement = (id: number) => {
  return request({
    url: `/project/technology-achievement-certify/delete?id=${id}`,
    method: 'DELETE',
  })
}
// 更新科技成果鉴定
export const updateAchievement = (data: any) => {
  return request({
    url: '/project/technology-achievement-certify/update',
    method: 'PUT',
    data,
  })
}

// 导出科技成果鉴定 Excel
export function getAchievementExport(params: any) {
  return request({
    url: '/project/technology-achievement-certify/export-excel',
    method: 'GET',
    responseType: 'blob',
    params,
  })
}